<%@taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/WEB-INF/fmas.tld" prefix="fmas" %>
<html>
<head>
<title>Locality List Page</title>
</head>
<body>
<div>
	<span><a href="LocalityCrudAction.html?action=edit"><img src="images/add-new.png"/></a></span>
</div>
<div align="center">
<div>
<s:form action="LocalityCrudAction.html" method="GET">
<table>
	<tr>
		<td>Locality Name</td>
		<td><s:textfield name="nameLike"/></td>
		<td>City</td>
		<td><s:select list="cities" listKey="id" listValue="name" name="cityId" headerKey="-1" headerValue=""></s:select></td>
		<td><a href="javascript:void(0);" class="searchButton" onclick="$(this).parents('form:first').submit();"></a></td>
	</tr>
</table>
</s:form>
</div>
<div style="width:100%" align="right">

</div>
<div style="clear: both;">
<table class="hovertable">
	<tr>
		<td colspan=13><fmas:pagination currPage="${page.pageNumber}" totalPages="${page.totalPages}" uri="LocalityCrudAction.html?nameLike=${nameLike}&cityId=${cityId}&pgNo=##"/></td></tr>
	<tr>
		<th>Id</th>
		<th width="160px">Name</th>
		<th>Alias</th>
		<th>Parent Locality</th>
		<th>Parent Locality Id</th>
		<th>City</th>
		<th>Latitude</th>
		<th>Longitude</th>
		<th>Created By</th>
		<th>Created On</th>
		<th>Last Modified By</th>
		<th>Last Modified On</th>
		<th>&nbsp;</th>
	</tr>
<s:iterator value="localities">
	<tr>
		<td><s:property value="id"/></td>
		<td><s:property value="name"/></td>
		<td><s:property value="alias"/></td>
		<td><s:property value="parentLocality.name"/></td>
		<td><s:property value="parentLocality.id"/></td>
		<td><s:property value="masterCity.name"/></td>
		<td><s:property value="latitude"/></td>
		<td><s:property value="longitude"/></td>
		<td><s:property value="createdBy.id"/></td>
		<td><s:date name="creationTstamp" format="yyyy-MM-dd" /></td>
		<td><s:property value="lastModifiedBy.id"/></td>
		<td><s:date name="lastModifiedTstamp" format="yyyy-MM-dd" /></td>
		<td><a href="LocalityCrudAction.html?action=edit&id=<s:property value='id'/>"><img src="images/edit.png"/></a></td>
	</tr>
</s:iterator>
</table>
</div>
</div>
</body>
</html>